let readInfoModel = require("../../model/blog/readTable")
let readInfoService = {
    add: (info)    => {
        return readInfoModel.insertMany([info]);
    },
    query: (info)  => {
        return readInfoModel.find(info).sort({ index: -1 });
    },
    delete: (info) => {
        return readInfoModel.remove(info);
    },
    update: (info) => {
        return readInfoModel.updateOne({ _id: info._id }, info);
    },
};
module.exports = readInfoService;
